package com.feihua.starter.service.impl;

import com.feihua.starter.service.api.ApiHdbScenicSpotPoService;
import com.feihua.starter.service.mapper.HdbScenicSpotPoMapper;
import com.feihua.starter.service.modules.hdb.dto.HdbScenicSpotDto;
import com.feihua.starter.service.modules.hdb.dto.SearchHdbScenicSpotsConditionDto;
import com.feihua.starter.service.modules.hdb.po.HdbScenicSpotPo;
import com.github.pagehelper.Page;
import feihua.jdbc.api.pojo.PageResultDto;
import feihua.jdbc.api.service.impl.ApiBaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * This class was generated by MyBatis Generator.
 * @author revolver 2018-06-29 22:26:31
 */
@Service
public class ApiHdbScenicSpotPoServiceImpl extends ApiBaseServiceImpl<HdbScenicSpotPo, HdbScenicSpotDto, String> implements ApiHdbScenicSpotPoService {
    @Autowired
    HdbScenicSpotPoMapper hdbScenicSpotPoMapper;

    public ApiHdbScenicSpotPoServiceImpl() {
        super(HdbScenicSpotDto.class);
    }

    @Override
    public PageResultDto<HdbScenicSpotDto> searchHdbScenicSpotsDsf(SearchHdbScenicSpotsConditionDto dto, feihua.jdbc.api.pojo.PageAndOrderbyParamDto pageAndOrderbyParamDto) {
        Page p = super.pageAndOrderbyStart(pageAndOrderbyParamDto);
        List<HdbScenicSpotDto> list = this.wrapDtos(hdbScenicSpotPoMapper.searchs(dto));
        return new PageResultDto(list, this.wrapPage(p));
    }
}